<!DOCTYPE html>
<html>
	<head>	
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
		<title>捷豹英仕挑战赛</title>
		 <link rel="stylesheet" href="__PUBLIC__/Home/css/font.css" />
		<link rel="stylesheet" charset="utf-8" type="text/css" href="__PUBLIC__/Home/css/sweep.css">
		<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Home/js/jquery.min.js" ></script>
		
		<script>
			var ua = navigator.userAgent; 		
			if (ua.indexOf("Android") > -1 ){
			var heigt=document.documentElement.clientHeight;
			var widte=document.documentElement.clientWidth;			
			}
			if (ua.indexOf("Mac") > -1 ){
				var heigt=window.screen.availHeight;
				var widte=window.screen.availWidth;			
			}	
			if (ua.indexOf("iPhone") > -1  ){
			var heigt=document.documentElement.clientHeight;
			var widte=document.documentElement.clientWidth;						
			}			
			$(document).ready(function(e) {			
				$(".bg1").css({"height":heigt,"width":widte});		
				$(".content").css({"width":widte,"height":heigt});			
				$(".form").css({"width":widte,"height":heigt*0.4});	
				$(".ts").css({"width":widte,"height":heigt*0.36});	
				$(".form input").css({"height":heigt*0.1,"line-height":heigt*0.1+"px"});
				$(".bt").css({"width":widte*0.3,"height":heigt*0.05});	
				$("#bt").click(function(){
				$(".ts").show();
				})
				$("#no").click(function(){
				$(".ts").hide();
				})
				$("#yes").click(function(){
					
					var feng=$('#feng').val();
					var uid=$('#uid').val();
					var type=$('#type').val();
					var url="{:U('Sweep/paly')}";
					var data={
						feng:feng,
						uid:uid,
						type:type
					}
					$.post(url,data,function(data){
						if(data.s){
						alert(data.m);
						window.location.href="{:U('Sweep/index')}";
						}else{
						alert(data.m);
						window.location.href="{:U('Sweep/index')}";
						}
					});
					
				})
				$(".bt1").css({"width":widte*0.3,"height":heigt*0.05});	
				
			});
		</script>
		
	</head>
	<body>
		<audio  autoplay="autoplay"  id="audio"></audio>
		
		<div class="bg1"></div>	
		<div class="content">
			<img class="logo" src="__PUBLIC__/Home/image/activity/logo.png"/>
			<if condition="$type eq 4"><p class="siez" style="width: 30%; line-height: 40px;">反应极限挑战</p></if>
			<if condition="$type eq 3"><p class="siez" style="width: 30%; line-height: 40px;">驭享非凡座驾</p></if>
			<div class="form">
				<p class="siez2">输入得分</p>
				<form>
					<input type="text" name="feng" id="feng" />
					<input type="hidden" name="uid" id="uid" value="{$uid}" />
					<input type="hidden" name="type" id="type" value="{$type}" />		
				</form>	
				<p class="siez2" style="padding-top: 15%;">等待游戏结束后，输入玩家所得总分。</p>
			</div>
			
			<if condition="$type eq 3"><p class="siez1" style="text-align: left; width: 90%;">游戏规则：<br/> 
				 1.玩家需在规定时间内完成游戏；<br/> 2. 游戏完成后，礼仪小姐将玩家的总得分输入进成绩栏中。  </p></if>
				
			<if condition="$type eq 4"><p class="siez1" style="text-align: left; width: 90%;">游戏规则：<br/> 
				1. 游戏时间为1分钟；<br/>  2. 游戏结束后，礼仪小姐需将玩家击中的个数输入进成绩栏中。  </p>	</if>
				
			<p class="siez1" style="text-align: left; width: 90%;">注意事项：</br>
					1.如果玩家已完成游戏，请点击“完成”按钮；</br>
					2. 完成游戏后，玩家将得到相应得分；</br>
					3.如果页面上没有显示“上传成功”，请联系现场技术人员。</p>
			<div class="ts">
				<p class="siez2" style="padding-top: 8%;">是否确认玩家已结完成体验？</p>
				<button class="bt1" id="no" type="button">取消</button>
				<button class="bt1" id="yes" type="button">确定</button>
			</div>
	<button class="bt" id="bt" type="button">完成</button>
		</div>
		
	</body>
</html>
